package com.hhy.entity;

import java.io.Serializable;

/**
 * @Description 用户对象的实体类
 * @Author hhy
 * @Date 2020/10/29 9:26
 */
public class User implements Serializable {

    private static final long serialVersionUID = -1450556750955527381L;
    //用户名
    private String username;
    //密码
    private String password;
    //手机号
    private Long phoneNumber;
    //套餐
    private String meal;
    //是否是管理员,默认不是管理员
    private Boolean isAdmin = false;

    //手机还剩多少钱
    private Double callCast;

    //打电话时间
    private Integer cellTime;



    public Double getCallCast() {
        return callCast;
    }

    public void setCallCast(Double callCast) {
        this.callCast = callCast;
    }


    public Integer getCellTime() {
        return cellTime;
    }

    public void setCellTime(Integer cellTime) {
        this.cellTime = cellTime;
    }

    @Override
    public String toString() {
        return "User{" +
                "username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", phoneNumber=" + phoneNumber +
                ", meal='" + meal + '\'' +
                ", isAdmin=" + isAdmin +
                '}';
    }

    //构造方法写两个， 区分是否是管理员
    public User(String username, String password, Long phoneNumber, String meal, Boolean isAdmin) {
        this.username = username;
        this.password = password;
        this.phoneNumber = phoneNumber;
        this.meal = meal;
        this.isAdmin = isAdmin;
    }

    public User(String username, String password, Long phoneNumber, String meal) {
        this.username = username;
        this.password = password;
        this.phoneNumber = phoneNumber;
        this.meal = meal;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Long getPhoneNumber() {
        return phoneNumber;
    }

    public void setPhoneNumber(Long phoneNumber) {
        this.phoneNumber = phoneNumber;
    }

    public String getMeal() {
        return meal;
    }

    public void setMeal(String meal) {
        this.meal = meal;
    }

    public Boolean getAdmin() {
        return isAdmin;
    }

    public void setAdmin(Boolean admin) {
        isAdmin = admin;
    }
}
